// 导入用户集合
const { Mood } = require('../../../model/mood');

module.exports = (req, res) => {
  const { id } = req.body
  console.log('req.body', req.body)
  const mood = Mood.updateOne({_id: id}, req.body, (err, row) => {
    if(!err) {
      res.json({
        message: '更新成功!'
      })
    } else {
      res.status(403)
      res.json({
        log: err,
        message: '更新失败！'
      })
    }
  })
}